<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    class User {
        constructor(name) {
            this.name = name;
        }
        // show() {
        //     console.log(this)
        //     console.log(this.name)
        // }
    }
    class Admin extends User {
        constructor(name,age) {
            super(name);
            this.age = age;
        }
        // show() {
        //     super.show()
        //     // console.log("yyg1")
        // }
    }
    let hd = new Admin('kun',15)
    console.log(hd.name)
    console.log(hd.age)



















    // console.log(hd.__proto__);
    // console.log(Admin.prototype)
    // console.log(hd.__proto__===Admin.prototype)
    // console.dir(Admin.prototype.__proto__)
    // console.dir(Admin.prototype.constructor)
    // console.dir(Admin)
    // console.dir(User)

</script>